package com.ymttest.database.mapping.stockmgr;

import com.ymttest.database.model.stockmgr.agentinventory;
import com.ymttest.database.model.stockmgr.agentinventoryExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface agentinventoryMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table agentinventory
     *
     * @mbggenerated Wed Feb 05 17:07:38 CST 2020
     */
    @SelectProvider(type=agentinventorySqlProvider.class, method="countByExample")
    int countByExample(agentinventoryExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table agentinventory
     *
     * @mbggenerated Wed Feb 05 17:07:38 CST 2020
     */
    @DeleteProvider(type=agentinventorySqlProvider.class, method="deleteByExample")
    int deleteByExample(agentinventoryExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table agentinventory
     *
     * @mbggenerated Wed Feb 05 17:07:38 CST 2020
     */
    @Delete({
        "delete from agentinventory",
        "where Id = #{id,jdbcType=BIGINT}"
    })
    int deleteByPrimaryKey(Long id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table agentinventory
     *
     * @mbggenerated Wed Feb 05 17:07:38 CST 2020
     */
    @Insert({
        "insert into agentinventory (Id, InventoryNo, ",
        "SellerId, Type, ",
        "OrderId, OperatorId, ",
        "Remark, CreateTime, ",
        "UpdateTime)",
        "values (#{id,jdbcType=BIGINT}, #{inventoryNo,jdbcType=VARCHAR}, ",
        "#{sellerId,jdbcType=INTEGER}, #{type,jdbcType=INTEGER}, ",
        "#{orderId,jdbcType=BIGINT}, #{operatorId,jdbcType=INTEGER}, ",
        "#{remark,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, ",
        "#{updateTime,jdbcType=TIMESTAMP})"
    })
    int insert(agentinventory record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table agentinventory
     *
     * @mbggenerated Wed Feb 05 17:07:38 CST 2020
     */
    @InsertProvider(type=agentinventorySqlProvider.class, method="insertSelective")
    int insertSelective(agentinventory record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table agentinventory
     *
     * @mbggenerated Wed Feb 05 17:07:38 CST 2020
     */
    @SelectProvider(type=agentinventorySqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="Id", property="id", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="InventoryNo", property="inventoryNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="SellerId", property="sellerId", jdbcType=JdbcType.INTEGER),
        @Result(column="Type", property="type", jdbcType=JdbcType.INTEGER),
        @Result(column="OrderId", property="orderId", jdbcType=JdbcType.BIGINT),
        @Result(column="OperatorId", property="operatorId", jdbcType=JdbcType.INTEGER),
        @Result(column="Remark", property="remark", jdbcType=JdbcType.VARCHAR),
        @Result(column="CreateTime", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="UpdateTime", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<agentinventory> selectByExample(agentinventoryExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table agentinventory
     *
     * @mbggenerated Wed Feb 05 17:07:38 CST 2020
     */
    @Select({
        "select",
        "Id, InventoryNo, SellerId, Type, OrderId, OperatorId, Remark, CreateTime, UpdateTime",
        "from agentinventory",
        "where Id = #{id,jdbcType=BIGINT}"
    })
    @Results({
        @Result(column="Id", property="id", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="InventoryNo", property="inventoryNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="SellerId", property="sellerId", jdbcType=JdbcType.INTEGER),
        @Result(column="Type", property="type", jdbcType=JdbcType.INTEGER),
        @Result(column="OrderId", property="orderId", jdbcType=JdbcType.BIGINT),
        @Result(column="OperatorId", property="operatorId", jdbcType=JdbcType.INTEGER),
        @Result(column="Remark", property="remark", jdbcType=JdbcType.VARCHAR),
        @Result(column="CreateTime", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="UpdateTime", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    agentinventory selectByPrimaryKey(Long id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table agentinventory
     *
     * @mbggenerated Wed Feb 05 17:07:38 CST 2020
     */
    @UpdateProvider(type=agentinventorySqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") agentinventory record, @Param("example") agentinventoryExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table agentinventory
     *
     * @mbggenerated Wed Feb 05 17:07:38 CST 2020
     */
    @UpdateProvider(type=agentinventorySqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") agentinventory record, @Param("example") agentinventoryExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table agentinventory
     *
     * @mbggenerated Wed Feb 05 17:07:38 CST 2020
     */
    @UpdateProvider(type=agentinventorySqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(agentinventory record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table agentinventory
     *
     * @mbggenerated Wed Feb 05 17:07:38 CST 2020
     */
    @Update({
        "update agentinventory",
        "set InventoryNo = #{inventoryNo,jdbcType=VARCHAR},",
          "SellerId = #{sellerId,jdbcType=INTEGER},",
          "Type = #{type,jdbcType=INTEGER},",
          "OrderId = #{orderId,jdbcType=BIGINT},",
          "OperatorId = #{operatorId,jdbcType=INTEGER},",
          "Remark = #{remark,jdbcType=VARCHAR},",
          "CreateTime = #{createTime,jdbcType=TIMESTAMP},",
          "UpdateTime = #{updateTime,jdbcType=TIMESTAMP}",
        "where Id = #{id,jdbcType=BIGINT}"
    })
    int updateByPrimaryKey(agentinventory record);
}